Integrand size = 33, antiderivative size = 186 \[ \int \frac {\sec ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=-\frac {a \left (2 A b^2+\left (2 a^2+b^2\right ) C\right ) \text {arctanh}(\sin (c+d x))}{2 b^4 d}+\frac {2 a^2 \left (A b^2+a^2 C\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b^4 \sqrt {a+b} d}+\frac {\left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{3 b^3 d}-\frac {a C \sec (c+d x) \tan (c+d x)}{2 b^2 d}+\frac {C \sec ^2(c+d x) \tan (c+d x)}{3 b d} \]
-1/2*a*(2*A*b^2+(2*a^2+b^2)*C)*arctanh(sin(d*x+c))/b^4/d+2*a^2*(A*b^2+C*a^ 2)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/b^4/d/(a-b)^(1/2)/( a+b)^(1/2)+1/3*(3*C*a^2+b^2*(3*A+2*C))*tan(d*x+c)/b^3/d-1/2*a*C*sec(d*x+c) *tan(d*x+c)/b^2/d+1/3*C*sec(d*x+c)^2*tan(d*x+c)/b/d
Result contains complex when optimal does not.
Time = 3.97 (sec) , antiderivative size = 657, normalized size of antiderivative = 3.53 \[ \int \frac {\sec ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\frac {\cos (c+d x) (b+a \cos (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \left (6 a \left (2 A b^2+\left (2 a^2+b^2\right ) C\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-6 a \left (2 A b^2+\left (2 a^2+b^2\right ) C\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-\frac {24 i a^2 \left (A b^2+a^2 C\right ) \arctan \left (\frac {(i \cos (c)+\sin (c)) \left (a \sin (c)+(-b+a \cos (c)) \tan \left (\frac {d x}{2}\right )\right )}{\sqrt {a^2-b^2} \sqrt {(\cos (c)-i \sin (c))^2}}\right ) (\cos (c)-i \sin (c))}{\sqrt {a^2-b^2} \sqrt {(\cos (c)-i \sin (c))^2}}+\frac {2 b^3 C \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {b^2 C \left ((-3 a+b) \cos \left (\frac {c}{2}\right )+(3 a+b) \sin \left (\frac {c}{2}\right )\right )}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {4 b \left (3 A b^2+3 a^2 C+2 b^2 C\right ) \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {2 b^3 C \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {b^2 C \left ((3 a-b) \cos \left (\frac {c}{2}\right )+(3 a+b) \sin \left (\frac {c}{2}\right )\right )}{\left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {4 b \left (3 A b^2+3 a^2 C+2 b^2 C\right ) \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{6 b^4 d (A+2 C+A \cos (2 (c+d x))) (a+b \sec (c+d x))} \]
(Cos[c + d*x]*(b + a*Cos[c + d*x])*(A + C*Sec[c + d*x]^2)*(6*a*(2*A*b^2 + (2*a^2 + b^2)*C)*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - 6*a*(2*A*b^2 + (2*a^2 + b^2)*C)*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - ((24*I)*a^2*( A*b^2 + a^2*C)*ArcTan[((I*Cos[c] + Sin[c])*(a*Sin[c] + (-b + a*Cos[c])*Tan [(d*x)/2]))/(Sqrt[a^2 - b^2]*Sqrt[(Cos[c] - I*Sin[c])^2])]*(Cos[c] - I*Sin [c]))/(Sqrt[a^2 - b^2]*Sqrt[(Cos[c] - I*Sin[c])^2]) + (2*b^3*C*Sin[(d*x)/2 ])/((Cos[c/2] - Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^3) + (b^2* C*((-3*a + b)*Cos[c/2] + (3*a + b)*Sin[c/2]))/((Cos[c/2] - Sin[c/2])*(Cos[ (c + d*x)/2] - Sin[(c + d*x)/2])^2) + (4*b*(3*A*b^2 + 3*a^2*C + 2*b^2*C)*S in[(d*x)/2])/((Cos[c/2] - Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) + (2*b^3*C*Sin[(d*x)/2])/((Cos[c/2] + Sin[c/2])*(Cos[(c + d*x)/2] + Sin[( c + d*x)/2])^3) + (b^2*C*((3*a - b)*Cos[c/2] + (3*a + b)*Sin[c/2]))/((Cos[ c/2] + Sin[c/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2) + (4*b*(3*A*b^2 + 3*a^2*C + 2*b^2*C)*Sin[(d*x)/2])/((Cos[c/2] + Sin[c/2])*(Cos[(c + d*x)/2 ] + Sin[(c + d*x)/2]))))/(6*b^4*d*(A + 2*C + A*Cos[2*(c + d*x)])*(a + b*Se c[c + d*x]))
Time = 1.40 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.09, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.485, Rules used = {3042, 4591, 3042, 4580, 25, 3042, 4570, 27, 3042, 4486, 3042, 4257, 4318, 3042, 3138, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4591 |
\(\displaystyle \frac {\int \frac {\sec ^2(c+d x) \left (-3 a C \sec ^2(c+d x)+b (3 A+2 C) \sec (c+d x)+2 a C\right )}{a+b \sec (c+d x)}dx}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (-3 a C \csc \left (c+d x+\frac {\pi }{2}\right )^2+b (3 A+2 C) \csc \left (c+d x+\frac {\pi }{2}\right )+2 a C\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4580 |
\(\displaystyle \frac {\frac {\int -\frac {\sec (c+d x) \left (3 C a^2-b C \sec (c+d x) a-2 \left (3 C a^2+b^2 (3 A+2 C)\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)}dx}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {-\frac {\int \frac {\sec (c+d x) \left (3 C a^2-b C \sec (c+d x) a-2 \left (3 C a^2+b^2 (3 A+2 C)\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)}dx}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (3 C a^2-b C \csc \left (c+d x+\frac {\pi }{2}\right ) a-2 \left (3 C a^2+b^2 (3 A+2 C)\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4570 |
\(\displaystyle \frac {-\frac {\frac {\int \frac {3 \sec (c+d x) \left (b C a^2+\left (2 A b^2+\left (2 a^2+b^2\right ) C\right ) \sec (c+d x) a\right )}{a+b \sec (c+d x)}dx}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {-\frac {\frac {3 \int \frac {\sec (c+d x) \left (b C a^2+\left (2 A b^2+\left (2 a^2+b^2\right ) C\right ) \sec (c+d x) a\right )}{a+b \sec (c+d x)}dx}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {\frac {3 \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (b C a^2+\left (2 A b^2+\left (2 a^2+b^2\right ) C\right ) \csc \left (c+d x+\frac {\pi }{2}\right ) a\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4486 |
\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {a \left (C \left (2 a^2+b^2\right )+2 A b^2\right ) \int \sec (c+d x)dx}{b}-\frac {2 a^2 \left (a^2 C+A b^2\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{b}\right )}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {a \left (C \left (2 a^2+b^2\right )+2 A b^2\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{b}-\frac {2 a^2 \left (a^2 C+A b^2\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}\right )}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {a \left (C \left (2 a^2+b^2\right )+2 A b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {2 a^2 \left (a^2 C+A b^2\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}\right )}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {a \left (C \left (2 a^2+b^2\right )+2 A b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {2 a^2 \left (a^2 C+A b^2\right ) \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{b^2}\right )}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {a \left (C \left (2 a^2+b^2\right )+2 A b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {2 a^2 \left (a^2 C+A b^2\right ) \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{b^2}\right )}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {a \left (C \left (2 a^2+b^2\right )+2 A b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {4 a^2 \left (a^2 C+A b^2\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{b^2 d}\right )}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {-\frac {\frac {3 \left (\frac {a \left (C \left (2 a^2+b^2\right )+2 A b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {4 a^2 \left (a^2 C+A b^2\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b d \sqrt {a-b} \sqrt {a+b}}\right )}{b}-\frac {2 \left (3 a^2 C+b^2 (3 A+2 C)\right ) \tan (c+d x)}{b d}}{2 b}-\frac {3 a C \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
(C*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*d) + ((-3*a*C*Sec[c + d*x]*Tan[c + d* x])/(2*b*d) - ((3*((a*(2*A*b^2 + (2*a^2 + b^2)*C)*ArcTanh[Sin[c + d*x]])/( b*d) - (4*a^2*(A*b^2 + a^2*C)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[ a + b]])/(Sqrt[a - b]*b*Sqrt[a + b]*d)))/b - (2*(3*a^2*C + b^2*(3*A + 2*C) )*Tan[c + d*x])/(b*d))/(2*b))/(3*b)
3.7.76.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[( e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[B/b Int[Csc[e + f*x], x], x] + Simp[(A*b - a*B)/b Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x ] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e _.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_S ymbol] :> Simp[(-C)*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2) )), x] + Simp[1/(b*(m + 2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[ b*A*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[csc[(e_.) + (f_.)*(x_)]^2*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[ (e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x _Symbol] :> Simp[(-C)*Csc[e + f*x]*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 3))), x] + Simp[1/(b*(m + 3)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[a*C + b*(C*(m + 2) + A*(m + 3))*Csc[e + f*x] - (2*a*C - b*B* (m + 3))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] & & NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_. ))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-C) *d*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d*Csc[e + f*x])^(n - 1)/(b*f *(m + n + 1))), x] + Simp[d/(b*(m + n + 1)) Int[(a + b*Csc[e + f*x])^m*(d *Csc[e + f*x])^(n - 1)*Simp[a*C*(n - 1) + (A*b*(m + n + 1) + b*C*(m + n))*C sc[e + f*x] - a*C*n*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, C, m}, x] && NeQ[a^2 - b^2, 0] && GtQ[n, 0]
Time = 0.54 (sec) , antiderivative size = 299, normalized size of antiderivative = 1.61
method | result | size |
derivativedivides | \(\frac {\frac {2 a^{2} \left (A \,b^{2}+C \,a^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{4} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {C}{3 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {2 A \,b^{2}+2 C \,a^{2}+C a b +2 C \,b^{2}}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {C \left (a +b \right )}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {a \left (2 A \,b^{2}+2 C \,a^{2}+C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 b^{4}}-\frac {C}{3 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {2 A \,b^{2}+2 C \,a^{2}+C a b +2 C \,b^{2}}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {C \left (a +b \right )}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {a \left (2 A \,b^{2}+2 C \,a^{2}+C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 b^{4}}}{d}\) | \(299\) |
default | \(\frac {\frac {2 a^{2} \left (A \,b^{2}+C \,a^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{4} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {C}{3 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {2 A \,b^{2}+2 C \,a^{2}+C a b +2 C \,b^{2}}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {C \left (a +b \right )}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {a \left (2 A \,b^{2}+2 C \,a^{2}+C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 b^{4}}-\frac {C}{3 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {2 A \,b^{2}+2 C \,a^{2}+C a b +2 C \,b^{2}}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {C \left (a +b \right )}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {a \left (2 A \,b^{2}+2 C \,a^{2}+C \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 b^{4}}}{d}\) | \(299\) |
risch | \(\frac {i \left (3 C a b \,{\mathrm e}^{5 i \left (d x +c \right )}+6 A \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+6 C \,a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+12 A \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+12 C \,a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+12 C \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-3 C b a \,{\mathrm e}^{i \left (d x +c \right )}+6 A \,b^{2}+6 C \,a^{2}+4 C \,b^{2}\right )}{3 d \,b^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) A}{\sqrt {a^{2}-b^{2}}\, d \,b^{2}}+\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) C}{\sqrt {a^{2}-b^{2}}\, d \,b^{4}}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) A}{\sqrt {a^{2}-b^{2}}\, d \,b^{2}}-\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) C}{\sqrt {a^{2}-b^{2}}\, d \,b^{4}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{b^{2} d}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{b^{4} d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 b^{2} d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{b^{2} d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{b^{4} d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 b^{2} d}\) | \(584\) |
1/d*(2*a^2*(A*b^2+C*a^2)/b^4/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*d*x +1/2*c)/((a+b)*(a-b))^(1/2))-1/3*C/b/(tan(1/2*d*x+1/2*c)-1)^3-1/2*(2*A*b^2 +2*C*a^2+C*a*b+2*C*b^2)/b^3/(tan(1/2*d*x+1/2*c)-1)-1/2*C*(a+b)/b^2/(tan(1/ 2*d*x+1/2*c)-1)^2+1/2*a*(2*A*b^2+2*C*a^2+C*b^2)/b^4*ln(tan(1/2*d*x+1/2*c)- 1)-1/3*C/b/(tan(1/2*d*x+1/2*c)+1)^3-1/2*(2*A*b^2+2*C*a^2+C*a*b+2*C*b^2)/b^ 3/(tan(1/2*d*x+1/2*c)+1)+1/2*C*(a+b)/b^2/(tan(1/2*d*x+1/2*c)+1)^2-1/2*a*(2 *A*b^2+2*C*a^2+C*b^2)/b^4*ln(tan(1/2*d*x+1/2*c)+1))
Time = 1.80 (sec) , antiderivative size = 663, normalized size of antiderivative = 3.56 \[ \int \frac {\sec ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\left [\frac {6 \, {\left (C a^{4} + A a^{2} b^{2}\right )} \sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )^{3} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) - 3 \, {\left (2 \, C a^{5} + {\left (2 \, A - C\right )} a^{3} b^{2} - {\left (2 \, A + C\right )} a b^{4}\right )} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (2 \, C a^{5} + {\left (2 \, A - C\right )} a^{3} b^{2} - {\left (2 \, A + C\right )} a b^{4}\right )} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, C a^{2} b^{3} - 2 \, C b^{5} + 2 \, {\left (3 \, C a^{4} b + {\left (3 \, A - C\right )} a^{2} b^{3} - {\left (3 \, A + 2 \, C\right )} b^{5}\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (C a^{3} b^{2} - C a b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} b^{4} - b^{6}\right )} d \cos \left (d x + c\right )^{3}}, \frac {12 \, {\left (C a^{4} + A a^{2} b^{2}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right )^{3} - 3 \, {\left (2 \, C a^{5} + {\left (2 \, A - C\right )} a^{3} b^{2} - {\left (2 \, A + C\right )} a b^{4}\right )} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (2 \, C a^{5} + {\left (2 \, A - C\right )} a^{3} b^{2} - {\left (2 \, A + C\right )} a b^{4}\right )} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, C a^{2} b^{3} - 2 \, C b^{5} + 2 \, {\left (3 \, C a^{4} b + {\left (3 \, A - C\right )} a^{2} b^{3} - {\left (3 \, A + 2 \, C\right )} b^{5}\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (C a^{3} b^{2} - C a b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} b^{4} - b^{6}\right )} d \cos \left (d x + c\right )^{3}}\right ] \]
[1/12*(6*(C*a^4 + A*a^2*b^2)*sqrt(a^2 - b^2)*cos(d*x + c)^3*log((2*a*b*cos (d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 + 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2)) - 3*(2*C*a^5 + (2*A - C)*a^3*b^2 - (2*A + C)*a*b^4)*cos(d*x + c )^3*log(sin(d*x + c) + 1) + 3*(2*C*a^5 + (2*A - C)*a^3*b^2 - (2*A + C)*a*b ^4)*cos(d*x + c)^3*log(-sin(d*x + c) + 1) + 2*(2*C*a^2*b^3 - 2*C*b^5 + 2*( 3*C*a^4*b + (3*A - C)*a^2*b^3 - (3*A + 2*C)*b^5)*cos(d*x + c)^2 - 3*(C*a^3 *b^2 - C*a*b^4)*cos(d*x + c))*sin(d*x + c))/((a^2*b^4 - b^6)*d*cos(d*x + c )^3), 1/12*(12*(C*a^4 + A*a^2*b^2)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^ 2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c)))*cos(d*x + c)^3 - 3*(2* C*a^5 + (2*A - C)*a^3*b^2 - (2*A + C)*a*b^4)*cos(d*x + c)^3*log(sin(d*x + c) + 1) + 3*(2*C*a^5 + (2*A - C)*a^3*b^2 - (2*A + C)*a*b^4)*cos(d*x + c)^3 *log(-sin(d*x + c) + 1) + 2*(2*C*a^2*b^3 - 2*C*b^5 + 2*(3*C*a^4*b + (3*A - C)*a^2*b^3 - (3*A + 2*C)*b^5)*cos(d*x + c)^2 - 3*(C*a^3*b^2 - C*a*b^4)*co s(d*x + c))*sin(d*x + c))/((a^2*b^4 - b^6)*d*cos(d*x + c)^3)]
\[ \int \frac {\sec ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {\sec ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 372 vs. \(2 (169) = 338\).
Time = 0.35 (sec) , antiderivative size = 372, normalized size of antiderivative = 2.00 \[ \int \frac {\sec ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=-\frac {\frac {3 \, {\left (2 \, C a^{3} + 2 \, A a b^{2} + C a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{4}} - \frac {3 \, {\left (2 \, C a^{3} + 2 \, A a b^{2} + C a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{4}} - \frac {12 \, {\left (C a^{4} + A a^{2} b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} b^{4}} + \frac {2 \, {\left (6 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} b^{3}}}{6 \, d} \]
-1/6*(3*(2*C*a^3 + 2*A*a*b^2 + C*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) /b^4 - 3*(2*C*a^3 + 2*A*a*b^2 + C*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c) - 1) )/b^4 - 12*(C*a^4 + A*a^2*b^2)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a ^2 + b^2)))/(sqrt(-a^2 + b^2)*b^4) + 2*(6*C*a^2*tan(1/2*d*x + 1/2*c)^5 + 3 *C*a*b*tan(1/2*d*x + 1/2*c)^5 + 6*A*b^2*tan(1/2*d*x + 1/2*c)^5 + 6*C*b^2*t an(1/2*d*x + 1/2*c)^5 - 12*C*a^2*tan(1/2*d*x + 1/2*c)^3 - 12*A*b^2*tan(1/2 *d*x + 1/2*c)^3 - 4*C*b^2*tan(1/2*d*x + 1/2*c)^3 + 6*C*a^2*tan(1/2*d*x + 1 /2*c) - 3*C*a*b*tan(1/2*d*x + 1/2*c) + 6*A*b^2*tan(1/2*d*x + 1/2*c) + 6*C* b^2*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^3*b^3))/d
Time = 20.88 (sec) , antiderivative size = 3914, normalized size of antiderivative = 21.04 \[ \int \frac {\sec ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \]
(a^2*atan(((a^2*((a + b)*(a - b))^(1/2)*(A*b^2 + C*a^2)*((8*tan(c/2 + (d*x )/2)*(8*C^2*a^9 - 16*C^2*a^8*b - 4*A^2*a^2*b^7 + 12*A^2*a^3*b^6 - 16*A^2*a ^4*b^5 + 8*A^2*a^5*b^4 - C^2*a^2*b^7 + 3*C^2*a^3*b^6 - 7*C^2*a^4*b^5 + 13* C^2*a^5*b^4 - 16*C^2*a^6*b^3 + 16*C^2*a^7*b^2 - 4*A*C*a^2*b^7 + 12*A*C*a^3 *b^6 - 20*A*C*a^4*b^5 + 28*A*C*a^5*b^4 - 32*A*C*a^6*b^3 + 16*A*C*a^7*b^2)) /b^6 + (a^2*((a + b)*(a - b))^(1/2)*(A*b^2 + C*a^2)*((8*(4*A*a^3*b^10 - 8* A*a^2*b^11 - 2*C*a^2*b^11 + 2*C*a^3*b^10 - 6*C*a^4*b^9 + 4*C*a^5*b^8 + 4*A *a*b^12 + 2*C*a*b^12))/b^9 - (8*a^2*tan(c/2 + (d*x)/2)*((a + b)*(a - b))^( 1/2)*(A*b^2 + C*a^2)*(8*a*b^10 - 16*a^2*b^9 + 8*a^3*b^8))/(b^6*(b^6 - a^2* b^4))))/(b^6 - a^2*b^4))*1i)/(b^6 - a^2*b^4) + (a^2*((a + b)*(a - b))^(1/2 )*(A*b^2 + C*a^2)*((8*tan(c/2 + (d*x)/2)*(8*C^2*a^9 - 16*C^2*a^8*b - 4*A^2 *a^2*b^7 + 12*A^2*a^3*b^6 - 16*A^2*a^4*b^5 + 8*A^2*a^5*b^4 - C^2*a^2*b^7 + 3*C^2*a^3*b^6 - 7*C^2*a^4*b^5 + 13*C^2*a^5*b^4 - 16*C^2*a^6*b^3 + 16*C^2* a^7*b^2 - 4*A*C*a^2*b^7 + 12*A*C*a^3*b^6 - 20*A*C*a^4*b^5 + 28*A*C*a^5*b^4 - 32*A*C*a^6*b^3 + 16*A*C*a^7*b^2))/b^6 - (a^2*((a + b)*(a - b))^(1/2)*(A *b^2 + C*a^2)*((8*(4*A*a^3*b^10 - 8*A*a^2*b^11 - 2*C*a^2*b^11 + 2*C*a^3*b^ 10 - 6*C*a^4*b^9 + 4*C*a^5*b^8 + 4*A*a*b^12 + 2*C*a*b^12))/b^9 + (8*a^2*ta n(c/2 + (d*x)/2)*((a + b)*(a - b))^(1/2)*(A*b^2 + C*a^2)*(8*a*b^10 - 16*a^ 2*b^9 + 8*a^3*b^8))/(b^6*(b^6 - a^2*b^4))))/(b^6 - a^2*b^4))*1i)/(b^6 - a^ 2*b^4))/((16*(4*C^3*a^11 - 6*C^3*a^10*b - 4*A^3*a^4*b^7 + 4*A^3*a^5*b^6...